Attribute VB_Name = "MODregister"
Public Declare Function RegDataGrid Lib "MSDATGRD.OCX" Alias "DllRegisterServer" () As Long
Public Declare Function RegBind Lib "MSBIND.DLL" Alias "DllRegisterServer" () As Long
Public Const S_OK = &H0

Sub RegisterDataGrid()
   
   On Error GoTo Err_Registration1_Failed
   
   If RegDataGrid = S_OK Then
      MsgBox "DataGrid Registered Successfully"
   Else
      MsgBox "Not Registered"
   End If

Exit Sub
Err_Registration1_Failed:
    MsgBox "Error: " & Err.Number & " " & Err.Description
    End Sub

Sub RegisterBind()
   
   On Error GoTo Err_Registration2_Failed
   
   If RegBind = S_OK Then
      MsgBox "Bind DLL Registered Successfully"
   Else
      MsgBox "Not Registered"
   End If

    Exit Sub

Err_Registration2_Failed:
    
    MsgBox "Error: " & Err.Number & " " & Err.Description
    
End Sub
